/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package hw2;

import java.awt.List;
import java.util.ArrayList;
import hw2.Room;

/**
 *
 * @author Avishay
 */
public class House {

    private ArrayList rooms;
    private ArrayList furnitures;
    private int width;
    private int height;

    public House(int width, int height) {
        if (1 > width || 1 > height) {
            width = 20;
            height = 10;
        }

        this.width = width;
        this.height = height;

        rooms = new ArrayList<Room>();
        furnitures = new ArrayList<Furniture>();
    }

    public ArrayList getFurnitures() {
        return furnitures;
    }

    public void createRoom(Rectangle position, Doorway doorway) {
        rooms.add(new Room(position, doorway));
    }

    public void addRoom(Room room) {
        rooms.add(room);
    }

    public void addFurniture(Furniture furniture) {
        furnitures.add(furniture);
    }
}
